////////////////////
// Top Sites
////////////////////
/**
 * Use the `Browser.topSites` API to access the top sites (i.e. most visited sites) that are displayed on the new tab page. These do not include shortcuts customized by the user.
 *
 * Permissions: "topSites"
 */
export namespace topSites {
    /** An object encapsulating a most visited URL, such as the URLs on the new tab page. */
    export interface MostVisitedURL {
        /** The most visited URL. */
        url: string;
        /** The title of the page */
        title: string;
    }

    /** Gets a list of top sites. */
    export function get(callback?: (data: MostVisitedURL[]) => void): Promise<MostVisitedURL[]> {
        return Wab.callFunctionAsync({ funcName: 'topSites.get' }).then(res => {
            callback?.(res)
            return res
        })
    }
}